const todoKey = 'todos'
const idKey = 'id'

export default{
  setTodo(newVal){
    localStorage.setItem('todoKey',JSON.stringify(newVal))
  },
  getTodo(){
    return JSON.parse(localStorage.getItem('todoKey')?localStorage.getItem('todoKey'):"[]")
  },
  setId(newId){
    localStorage.setItem('idKey',JSON.stringify(newId))
  },
  getId(){
    return JSON.parse(localStorage.getItem('idKey')?localStorage.getItem('idKey'):"1")
  }
}

